-- GENERATED SPELL FOR [Illidari Dreadbringer] --


function spell0_19799(pUnit, Event) --@Curse of Blood,n/a--
pUnit:FullCastSpellOnTarget(38167,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19799', 2000, 1)
end

function spell1_19799(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(38166,pUnit)
pUnit:RegisterEvent('Sorts_19799', 30266, 1)
end

function Sorts_19799(pUnit, Event)
local choix_sorts_19799 = math.random(0, 1)
if choix_sorts_19799 == 0 then
pUnit:RegisterEvent('spell0_19799', 1, 1)
end
if choix_sorts_19799 == 1 then
pUnit:RegisterEvent('spell1_19799', 1, 1)
end
end

function mob19799_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19799', math.random(1500, 3000), 1)
end

function mob19799_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19799_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19799_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19799, 1, 'mob19799_Action')
RegisterUnitEvent(19799, 2, 'mob19799_Leave')
RegisterUnitEvent(19799, 3, 'mob19799_Kill')
RegisterUnitEvent(19799, 4, 'mob19799_Die')
